package com.zhitan.ems.app.iot.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zhitan.ems.app.iot.entity.DevicePropertyEntity;
import com.zhitan.ems.app.iot.mapper.DevicePropertyMapper;
import com.zhitan.ems.app.iot.service.DevicePropertyService;
import com.zhitan.ems.framework.core.mp.base.BaseServiceImpl;

@Service
public class DevicePropertyServiceImpl extends BaseServiceImpl<DevicePropertyMapper, DevicePropertyEntity> implements DevicePropertyService {

	@Override
	public List<DevicePropertyEntity> getByTypeId(Long typeId,Integer kind) {
		   QueryWrapper<DevicePropertyEntity> queryWrapper =new QueryWrapper<>();
		   queryWrapper.eq("type_id", typeId);
		   queryWrapper.eq(kind!=null,"kind", kind);
		   return this.list(queryWrapper);
	}
}